<div class="formBox">
<h2 class="calendar">Event Calendars</h2>
<?php 
if($this->calendars && count($this->calendars) > 0)
{
	foreach ($this->calendars as $calendar)
	{
		$links[] = "<a href='/mod_event/calendar/edit/id/{$calendar->id}' class='calendar'>{$calendar->title}</a>";
	}
	if(is_array($links))
	{
		echo $this->htmlList($links, null, null, false);
	}
	unset($links);
}else{
    echo "<p>There are no calendars to view</p>";
}
?>
</div>	

<div class="formBox">
<h2 class="note">Upcoming Events</h2>
<?php 
if($this->events && count($this->events) > 0)
{
	foreach ($this->events as $event)
	{
		$links[] = "<a href='/mod_event/index/edit/id/{$event->id}' class='event'>{$event->title}</a><br />" . $this->RenderEventDate($event);
	}
	if(is_array($links))
	{
		echo $this->htmlList($links, null, null, false);
	}
}else{
    echo "<p>There are no events to view</p>";
}
?>
<p><a href="/mod_event/index/list/events/current">View all current events...</a></p>
<p><a href="/mod_event/index/list/events/expired">View expired events...</a></p>
</div>	
